package com.xw.musicplayer.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;

public class Music implements Parcelable {

    public String musicId;
    //地址
    public String pathUrl;

    //封面图
    public String iamgePath;

    //名字
    public String title;

    //演唱者
    public String singer;

    public Music() {
    }

    protected Music(Parcel in) {
        musicId = in.readString();
        pathUrl = in.readString();
        iamgePath = in.readString();
        title = in.readString();
        singer = in.readString();
    }

    public static final Creator<Music> CREATOR = new Creator<Music>() {
        @Override
        public Music createFromParcel(Parcel in) {
            return new Music(in);
        }

        @Override
        public Music[] newArray(int size) {
            return new Music[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(musicId);
        dest.writeString(pathUrl);
        dest.writeString(iamgePath);
        dest.writeString(title);
        dest.writeString(singer);
    }
}
